package com.kingyea.mobilepolice.rolepermission.service;

import com.kingyea.mobilepolice.rolepermission.bean.RolePermission;
import com.kingyea.mobilepolice.rolepermission.bean.RolePermissionCondition;

import java.util.List;

/**
 * @author Mr.Lin
 * @version v1.0.0
 * @description RolePermission 接口
 * @date Created in 2018-03-30 15:32:07
 */
public interface RolePermissionService {

    /**
     * 通过ID查找对象
     *
     * @param id
     * @return
     */
    RolePermission getById(Integer id) throws Exception;

    /**
     * 列表
     *
     * @param condition
     * @return
     */
    List<RolePermission> search(RolePermissionCondition condition);

    /**
     * 删除
     *
     * @param id
     * @return
     */
    int deleteById(Integer id) throws Exception;

    /**
     * 添加
     *
     * @param rolePermission
     * @return
     */
    RolePermission save(RolePermission rolePermission) throws Exception;

    /**
     * 更新
     *
     * @param rolePermission
     * @return
     */
    RolePermission update(RolePermission rolePermission) throws Exception;
}
